﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ChinaDynastyTours.Helpers
{
    class SqlHelper
    {
        public static string SQLCheck(string str)
        {
            //过滤'及空白字符
            StringBuilder tmpStr = new StringBuilder(str);
            return tmpStr.Replace(" ", "").Replace("'", "''").Replace("%", "[%]").Replace("_", "[_]").Replace("[", "[[]").ToString();
            
        }
    }
}
